ScrolledWindow: Don’t req size for autohidden bars
authorDaniel Boles <dboles@src.gnome.org>
Fri, 24 Feb 2017 22:46:05 +0000 (22:46 +0000)
committerDaniel Boles <dboles.src@gmail.com>
Fri, 2 Jun 2017 18:36:04 +0000 (19:36 +0100)
commitfcfad2dd7eaa881efa038ad6448990bba98b8fcd
tree973bc9513ea79c73bf0c53351af6e82400334efb
parent7214f4d4c956bf76443c0712cd343bba36050f3d
ScrolledWindow: Don’t req size for autohidden bars

POLICY_AUTOMATIC means scrollbars are only shown when needed, i.e. when
the size of the window is not large enough to show the entire child. So
when measuring the preferred size, such scrollbars should be ignored.

But measure() added size for *any* non-overlay scrollbar of the opposite
orientation, e.g. for horizontal size, it added the width of vscrollbar.
So we requested for child + bar, & having enough for child meant that the
policy hid the bar, leaving extra space empty below/right of the child.

Fix this by only adding size for such bars if they use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
gtk/gtkscrolledwindow.c